package com.atguigu.gulimall.search.thread;

import java.util.concurrent.*;

public class PoolTest {
    //当前系统池中只有一两个，每个异步任务，提交给线程池让他自己去执行就行
    public static ExecutorService service = Executors.newFixedThreadPool(10);
    public static void main(String[] args) {
        ThreadPoolExecutor executor = new ThreadPoolExecutor(
                5,
                200,
                10,
                TimeUnit.SECONDS,
                new LinkedBlockingDeque<>(100000),
                Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.AbortPolicy());
    }
}
